openapi: 3.0.0
info:
  version: 1.0.0
  title: OWS Services
  description: An OWS service refers to any of the OGC services that GeoServer supports,
    such as WFS, WMS, and WCS. These endpoints controls the settings of these
    services.

security:
  - basicAuth: []

tags:
  - name: owsServices
    description: Global Settings API


paths:
  /services/wms/settings:
    get:
      tags:
        - owsServices
      operationId: getWMSSettings
      description: Retrieves Web Map Service global settings..
      responses:
        "200":
          $ref: "#/components/responses/WMSInfo"
    put:
      tags:
        - owsServices
      operationId: updateWMSSettings
      description: Edits a global WMS setting.
      requestBody:
        $ref: "#/components/requestBodies/WMSInfo"
      responses:
        "201":
          description: Created
  /services/wms/workspaces/{workspace}/settings:
    parameters:
      - name: workspace
        in: path
        required: true
        description: The workspace name
        schema:
          type: string
    get:
      tags:
        - owsServices
      operationId: getLocalWMSSettings
      description: Retrieves Web Map Service settings for a given workspace.
      responses:
        "200":
          $ref: "#/components/responses/WMSInfo"
    put:
      tags:
        - owsServices
      operationId: updateLocalWMSSettings
      description: Edits a workspace-specific WMS setting.
      requestBody:
        $ref: "#/components/requestBodies/WMSInfo"
      responses:
        "200":
          description: Updated
    delete:
      tags:
        - owsServices
      operationId: deleteLocalWMSSettings
      description: Deletes a workspace-specific WMS setting.
      responses:
        "200":
          description: OK
  /services/wfs/settings:
    get:
      tags:
        - owsServices
      operationId: getWFSSettings
      description: Retrieves Web Feature Service global settings..
      responses:
        "200":
          $ref: "#/components/responses/WFSInfo"
    put:
      tags:
        - owsServices
      operationId: updateWFSSettings
      description: Edits a global WFS setting.
      requestBody:
        $ref: "#/components/requestBodies/WFSInfo"
      responses:
        "201":
          description: Created
  /services/wfs/workspaces/{workspace}/settings:
    parameters:
      - name: workspace
        in: path
        required: true
        description: The workspace name
        schema:
          type: string
    get:
      tags:
        - owsServices
      operationId: getLocalWFSSettings
      description: Retrieves Web Feature Service settings for a given workspace.
      responses:
        "200":
          $ref: "#/components/responses/WFSInfo"
    put:
      tags:
        - owsServices
      operationId: updateLocalWFSSettings
      description: Edits a workspace-specific WFS setting.
      requestBody:
        $ref: "#/components/requestBodies/WFSInfo"
      responses:
        "200":
          description: Updated
    delete:
      tags:
        - owsServices
      operationId: deleteLocalWFSSettings
      description: Deletes a workspace-specific WFS setting.
      responses:
        "200":
          description: OK
  /services/wcs/settings:
    get:
      tags:
        - owsServices
      operationId: getWCSSettings
      description: Retrieves Web Coverage Service global settings..
      responses:
        "200":
          $ref: "#/components/responses/WCSInfo"
    put:
      tags:
        - owsServices
      operationId: updateWCSSettings
      description: Edits a global WCS setting.
      requestBody:
        $ref: "#/components/requestBodies/WCSInfo"
      responses:
        "201":
          description: Created
  /services/wcs/workspaces/{workspace}/settings:
    parameters:
      - name: workspace
        in: path
        required: true
        description: The workspace name
        schema:
          type: string
    get:
      tags:
        - owsServices
      operationId: getLocalWCSSettings
      description: Retrieves Web Coverage Service settings for a given workspace.
      responses:
        "200":
          $ref: "#/components/responses/WCSInfo"
    put:
      tags:
        - owsServices
      operationId: updateLocalWCSSettings
      description: Edits a workspace-specific WCS setting.
      requestBody:
        $ref: "#/components/requestBodies/WCSInfo"
      responses:
        "201":
          description: Created
    delete:
      tags:
        - owsServices
      operationId: deleteLocalWCSSettings
      description: Deletes a workspace-specific WCS setting.
      responses:
        "200":
          description: OK

  /services/wmts/settings:
    get:
      tags:
        - owsServices
      operationId: getWMTSSettings
      description: Retrieves Web Map Tile Service global settings..
      responses:
        "200":
          $ref: "#/components/responses/WMTSInfo"
    put:
      tags:
        - owsServices
      operationId: updateWMTSSettings
      description: Edits a global WMTS setting.
      requestBody:
        $ref: "#/components/requestBodies/WMTSInfo"
      responses:
        "201":
          description: Created
  /services/wmts/workspaces/{workspace}/settings:
    parameters:
      - name: workspace
        in: path
        required: true
        description: The workspace name
        schema:
          type: string
    get:
      tags:
        - owsServices
      operationId: getLocalWMTSSettings
      description: Retrieves Web Map Service settings for a given workspace.
      responses:
        "200":
          $ref: "#/components/responses/WMTSInfo"
    put:
      tags:
        - owsServices
      operationId: updateLocalWMTSSettings
      description: Edits a workspace-specific WMTS setting.
      requestBody:
        $ref: "#/components/requestBodies/WMTSInfo"
      responses:
        "200":
          description: Updated
    delete:
      tags:
        - owsServices
      operationId: deleteLocalWMTSSettings
      description: Deletes a workspace-specific WMTS setting.
      responses:
        "200":
          description: OK

components:
  requestBodies:
    WMSInfo:
      description: Body of the WMS settings
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WMSInfoWrapper"
    WFSInfo:
      description: Body of the WFS settings
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WFSInfoWrapper"
    WCSInfo:
      description: Body of the WCS settings
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WCSInfoWrapper"
    WMTSInfo:
      description: Body of the WMTS settings
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WMTSInfoWrapper"
  responses:
    WMSInfo:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WMSInfoWrapper"
          examples:
            response:
              value: >
                {
                  "wms": {
                    "enabled": true,
                    "name": "My GeoServer WMS",
                    "title": "My GeoServer WMS",
                    "maintainer": "http://geoserver.org/comm",
                    "abstrct": "This is a description of your Web Map Server.",
                    "accessConstraints": "NONE",
                    "fees": "NONE",
                    "versions": {
                      "org.geotools.util.Version": [
                        {
                          "version": "1.1.1"
                        },
                        {
                          "version": "1.3.0"
                        }
                      ]
                    },
                    "keywords": {
                      "string": [
                        "WFS",
                        "WMS",
                        "GEOSERVER"
                      ]
                    },
                    "citeCompliant": false,
                    "onlineResource": "http://geoserver.org",
                    "schemaBaseURL": "http://schemas.opengis.net",
                    "verbose": false,
                    "metadata": {
                      "entry": [
                        {
                          "@key": "svgAntiAlias",
                          "$": "true"
                        },
                        {
                          "@key": "svgRenderer",
                          "$": "Batik"
                        }
                      ]
                    },
                    "watermark": {
                      "enabled": false,
                      "position": "BOT_RIGHT",
                      "transparency": 0
                    },
                    "interpolation": "Nearest",
                    "getFeatureInfoMimeTypeCheckingEnabled": false,
                    "getMapMimeTypeCheckingEnabled": false,
                    "dynamicStylingDisabled": false,
                    "maxBuffer": 25,
                    "maxRequestMemory": 0,
                    "maxRenderingTime": 0,
                    "maxRenderingErrors": 0
                  }
                }
    WFSInfo:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WFSInfoWrapper"
          examples:
            response:
              value: >
                {
                  "wfs": {
                    "enabled": true,
                    "name": "WFS",
                    "title": "GeoServer Web Feature Service",
                    "maintainer": "http://geoserver.org/comm",
                    "abstrct": "This is the reference implementation of WFS 1.0.0 and WFS 1.1.0, supports all WFS operations including Transaction.",
                    "accessConstraints": "NONE",
                    "fees": "NONE",
                    "versions": {
                      "org.geotools.util.Version": [
                        {
                          "version": "1.0.0"
                        },
                        {
                          "version": "1.1.0"
                        },
                        {
                          "version": "2.0.0"
                        }
                      ]
                    },
                    "keywords": {
                      "string": [
                        "WFS",
                        "WMS",
                        "GEOSERVER"
                      ]
                    },
                    "metadataLink": "",
                    "citeCompliant": false,
                    "onlineResource": "http://geoserver.org",
                    "schemaBaseURL": "http://schemas.opengis.net",
                    "verbose": false,
                    "gml": {
                      "entry": [
                        {
                          "version": "V_20",
                          "gml": {
                            "srsNameStyle": [
                              "URN2"
                            ],
                            "overrideGMLAttributes": false
                          }
                        },
                        {
                          "version": "V_10",
                          "gml": {
                            "srsNameStyle": [
                              "XML"
                            ],
                            "overrideGMLAttributes": true
                          }
                        },
                        {
                          "version": "V_11",
                          "gml": {
                            "srsNameStyle": [
                              "URN"
                            ],
                            "overrideGMLAttributes": false
                          }
                        }
                      ]
                    },
                    "serviceLevel": "COMPLETE",
                    "maxFeatures": 1000000,
                    "featureBounding": false,
                    "canonicalSchemaLocation": false,
                    "encodeFeatureMember": false,
                    "hitsIgnoreMaxFeatures": false,
                    "getFeatureOutputTypeCheckingEnabled": true,
                    "getFeatureOutputTypes": [
                      "text/xml; subtype=gml/3.1.1",
                      "application/json",
                      "application/vnd.geo+json",
                      "text/xml; subtype=gml/2.1.2",
                      "text/xml; subtype=gml/3.2",
                      "application/gml+xml; version=3.2",
                      "application/gml+xml; version=3.1.1",
                      "application/gml+xml; version=2.1.2"
                    ]
                  }
                }
    WCSInfo:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WCSInfoWrapper"
          examples:
            response:
              value: >
                {
                  "wcs": {
                    "enabled": true,
                    "name": "WCS",
                    "title": "Web Coverage Service",
                    "maintainer": "http://geoserver.org/comm",
                    "abstrct": "This server implements the WCS specification 1.0 and 1.1.1, it's reference implementation of WCS 1.1.1. All layers published by this service are available on WMS also.\n     ",
                    "accessConstraints": "NONE",
                    "fees": "NONE",
                    "versions": {
                      "org.geotools.util.Version": [
                        {
                          "version": "1.0.0"
                        },
                        {
                          "version": "1.1.1"
                        },
                        {
                          "version": "2.0.1"
                        }
                      ]
                    },
                    "keywords": {
                      "string": [
                        "WCS",
                        "WMS",
                        "GEOSERVER"
                      ]
                    },
                    "metadataLink": {
                      "type": "undef",
                      "about": "http://geoserver.sourceforge.net/html/index.php",
                      "metadataType": "other"
                    },
                    "citeCompliant": false,
                    "onlineResource": "http://geoserver.org",
                    "schemaBaseURL": "http://schemas.opengis.net",
                    "verbose": false,
                    "gmlPrefixing": false,
                    "latLon": false,
                    "maxInputMemory": 0,
                    "maxOutputMemory": 0
                  }
                }
    WMTSInfo:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/WMTSInfoWrapper"
  schemas:
    WMSInfoWrapper:
      type: object
      title: Wrapper object around WMSInfo, in order to conform to how XStream serializes to JSON in GeoServer
      properties:
        wms:
          $ref: "config.yaml#/components/schemas/WMSInfo"
    WFSInfoWrapper:
      type: object
      title: Wrapper object around WFSInfo, in order to conform to how XStream serializes to JSON in GeoServer
      properties:
        wfs:
          $ref: "config.yaml#/components/schemas/WFSInfo"
    WCSInfoWrapper:
      type: object
      title: Wrapper object around WCSInfo, in order to conform to how XStream serializes to JSON in GeoServer
      properties:
        wcs:
          $ref: "config.yaml#/components/schemas/WCSInfo"
    WMTSInfoWrapper:
      type: object
      title: Wrapper object around WMTSInfo, in order to conform to how XStream serializes to JSON in GeoServer
      properties:
        wmts:
          $ref: "config.yaml#/components/schemas/WMTSInfo"
          